#include "limbo/chunk.hpp"
#include <cstring>

using namespace limbo;

Chunk &Chunk::operator<<(const Chunk &other) {
  void *tail = (char *)data_ + size_;
  if (tail != other.data_) {
    memcpy(tail, other.data_, other.size_);
  }
  size_ += other.size_;
  return *this;
}
